using System;

using libsecondlife;

using Feathertail.Tracker;

namespace Feathertail.Tracker.Filters
{
    public class DistanceFilter : ObjectFilter
    {
        private double _Radius = 0;

        public DistanceFilter(double radius)
        {
            _Radius = radius;
        }

        public override bool IncludeObject(SecondLife Client, LLObject prim)
        {
            double distance = Client.Self.Position.GetDistanceTo(prim.Position);
            return (distance < _Radius);
        }
    }
}
